package com.ys.service.Impl;

import com.ys.mapper.UserMapper;
import com.ys.pojo.User;
import com.ys.service.MembertypeService;
import com.ys.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;
    @Resource
    private MembertypeService membertypeService;
    @Override
    public List<User> findByLeiXingAndShoujihao(String name, String shouji,String yaodian) {
        List<User> list = userMapper.findByLeiXingAndShoujihao(name,shouji,yaodian);
//        list.forEach(x->{
//            x.setMembertype(membertypeService.membertyp(x.getUserTypeid()));
//        });
        return list;
    }

    @Override
    public boolean addsinsert(User user) {
        return userMapper.insett(user);
    }

    @Override
    public boolean updsupdate(User user) {
        return userMapper.updsupdate(user);
    }


}
